<html>
<#include "../common/header.ftl">

<body>
<div id="wrapper" class="toggled">

    <#--边栏sidebar-->
    <#include "../common/nav.ftl">

    <#--主要内容content-->
    <div id="page-content-wrapper">
            <a href="/sell/seller/contact/index" type="button" class="btn btn-default btn-primary pull-right " style="width: 110px;margin-right: 40px;margin-bottom: 5px">录入新合同</a>
        <div class="container-fluid">
            <div class="row clearfix" >
                <div class="col-md-12 column">
                    <table class="table table-bordered table-condensed">
                        <thead>
                        <tr>
                            <th>合同id</th>
                            <th>销售人员id</th>
                            <th>客户id</th>
                            <th>总金额</th>
                            <th>状态</th>
                            <th>创建时间</th>
                            <th>修改时间</th>
                            <th colspan="2">操作</th>
                        </tr>
                        </thead>
                        <tbody>

                        <#list contactsInfoPage.list as contactsInfo>
                            <tr>
                                <td>${contactsInfo.contactId}</td>
                                <td>${contactsInfo.manId}</td>
                                <td>${contactsInfo.customerId}</td>
                                <td>${contactsInfo.contactMoney}</td>
                                <td>${contactsInfo.getContactStatusEnum().message}</td>
                                <td>${contactsInfo.getStringCreate()}</td>
                                <td>${contactsInfo.getStringUpdate()}</td>
                                <td><a href="/sell/seller/contact/detail?contactId=${contactsInfo.contactId}">详情</a></td>
                                <td>
                                    <#if contactsInfo.contactStatusEnum.getCode()==0>
                                        <a href="/sell/seller/contact/index?contactId=${contactsInfo.contactId}">修改</a>
                                    </#if>
                                </td>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                </div>

                <#--分页-->
                <div class="col-md-12 column " >
                    <ul class="pagination pull-right ">
                        <#if currentPage lte 1>
                            <li class="disabled"><a href="#">上一页</a></li>
                        <#else>
                            <li><a href="/sell/seller/contact/list?page=${currentPage - 1}&size=${size}">上一页</a></li>
                        </#if>

                        <#list 1..totalpage as index>
                            <#if currentPage == index>
                                <li class="disabled"><a href="#">${index}</a></li>
                            <#else>
                                <li><a href="/sell/seller/contact/list?page=${index}&size=${size}">${index}</a></li>
                            </#if>
                        </#list>

                        <#if currentPage gte totalpage>
                            <li class="disabled"><a href="#">下一页</a></li>
                        <#else>
                            <li><a href="/sell/seller/contact/list?page=${currentPage + 1}&size=${size}">下一页</a></li>
                        </#if>
                    </ul>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>